import Vue from 'vue'
import Router from 'vue-router'
import index from '@/views/index/index'
import login from '@/views/login/login'
import register from '@/views/login/register'
import indexManage from '@/views/index-manage/index-manage'
import authorManage from '@/views/author-manage/author-manage'
import sampleManage from '@/views/sample-manage/sample-manage'
import showManage from '@/views/show-manage/show-manage'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index,
      redirect:'/index-manage',
      children:[
        {
          path: '/index-manage',
          name: '首页管理',
          component: indexManage,

        },
        {
          path: '/author-manage',
          name: '艺术家管理',
          component: authorManage
        },
        {
          path: '/sample-manage',
          name: '作品集管理',
          component: sampleManage
        },
        {
          path: '/show-manage',
          name: '摄影展管理',
          component: showManage
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: login,
    },
    {
      path: '/register',
      name: 'register',
      component: register,
    }
  ]
})
